<?php

namespace app\admin\validate\other;

use think\Validate;

class Materialcolour extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'name' =>'require|unique:material_colour'
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'name.unique' => '色号已经存在！'
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['name'],
        'edit' => [],
    ];
    
}
